<html>
	<head>
		<link rel="stylesheet" type="text/css" href="/static/main.css" />
		<link rel="stylesheet" type="text/css" href="http://blog.reauthor.me/wp-content/themes/carrington-text/css/carrington-text.css" />
		<script type="text/javascript" SRC="/static/reauthorize.js"></script>

		<link rel="stylesheet" type="text/css" href="/lib/dojo/dojo/resources/dojo.css" />
		<link rel="stylesheet" type="text/css" href="/lib/dojo/dojo/resources/dnd.css" />
		<link rel="stylesheet" type="text/css" href="/lib/dojo/dijit/themes/soria/soria.css" />

		<SCRIPT TYPE="text/javascript" SRC="/lib/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></SCRIPT>
		<script type="text/javascript">
	       //load dojo
		   dojo.require("dojo.parser");
           dojo.require("dijit.layout.ContentPane");
           dojo.require("dijit.layout.TabContainer");
           dojo.require("dijit.form.Button");
		   dojo.require("dojo.dnd.Source");
		   
		   //load reauthor.me
			var feedJson = {{feed_json}};
		</script>

	</head>
	
	<body class="soria" onload="reauthLoad()">
		<!--Your feed url is: {{feed_url}}
		<br>
		Your request is: {{request_url}}
		<br>
		Your feed's json is: feed_json-->
	
		<div id="header" style="position: absolute; top: 10px; left: 10px; padding: 0; width: 90%; text-align: left;">
			<a href="http://blog.reauthor.me/" title="Home" rel="home"><img width="200px" src="/static/ReAuthorMeLogo.png"></a>
			<p id="blog-description" style="display: inline;">RePurpose, ReProfit, Real Easy</p>

			<div id="blog_info" style="float: right">
				<div style="float: left">
					<span id="blog_title"></span>
					<span id="blog_desc" style="display: none;"></span>
				</div>
			</div>
		</div>
		
		
		<!-- Tab Container -->
		<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" style="padding-top: 125px; text-align: left;">

			<div dojoType="dijit.layout.ContentPane" title="Build My Book" id="tab1" class="tab">
				
				<div class="edit_pane">
					<div class="header_bar">
						Blog Entries
						<div class="toolbar">
							<input type="text" style="width: 90px;">
							<button type="button">Filter</button>
						</div>
						<div id="blog_entries_list"></div>
					</div>
				</div>
				
				<div class="edit_pane">
					<div class="header_bar">
						Book Structure
						<div class="toolbar" >
							<button type="button" id="add_chapter_button" onclick="alert('Not yet implimented!')">+Chapter</button>
							<button type="button" id="add_page_button" onclick="alert('Not yet implimented!')">+Page</button>
						</div>
						<div id="book_structure_list" dojoType="dojo.dnd.Source" class="container">
						</div>
					</div>
				</div>
				
				<div class="edit_pane">
					<div class="header_bar">
						Edit Book
						<div class="toolbar" >
							<button type="button" id="save_edits" onclick="reauthSave()">Save</button>
						</div>
					</div>
					
					<div id="edit_post_form">
						<div class="edit_form_label">Chapter Title</div>
						<input type="text" class="edit_form_input" id="edit_form_title">
						<div class="edit_form_label">Chapter Content</div>
						<textarea class="edit_form_input" id="edit_form_content"></textarea>
						<input type="hidden" id="edit_form_post_id" value="">
					</div>
					
				</div>
				
			</div>

			<div dojoType="dijit.layout.ContentPane" title="Options" id="tab3" class="tab">
				<div class="options_group">
					<h2>Numbering</h2>
					<input type="radio" name="numbering" checked> 1, 2, 3
					<br>
					<input type="radio" name="numbering"> i, ii, iii
				</div>
				<div class="options_group">
					<h2>Subtitles</h2>
					<input type="checkbox" checked>Display subheadings
					<br>
					<input type="checkbox">Number subheadings
				</div>
				<div class="options_group">
					<h2>Table of Contents</h2>
					<input type="checkbox">Add loose pages (dedication, about the author, etc.) to table of contents
					<br>
					<input type="checkbox">Include subheadings
				</div>
			</div>

			<div dojoType="dijit.layout.ContentPane" title="Publish!" id="tab4" class="tab">
				<button type="button" id="publish_button" onclick="reauthPublish()">Publish Your E-Book!</button>
			</div>

		</div>
		
		<!--textarea id="testingta"></textarea-->
		
		<!-- form for generating the pdf -->
		<div style="display: none">
			<form id="publish_form" method="post" enctype="multipart/form-data" charset="utf-8" autocomplete="off" action="http://www.printwhatyoulike.com/html_to_pdf">
				<textarea id="ppw_save_page_field" name="pageSrc" ></textarea>
			</form>
		</div>
	
		<div class="clear"></div>
		<div id="footer">
			<p id="generator-link">Developed at Startup Weekend Des Moines.</p>
		</div>
			
	</body>
</html>
